<% HttpSession httpSession = request.getSession();
   Employee employee = (Employee)session.getAttribute("user");
   if(employee == null || employee.getRole()== null){
   	response.sendRedirect("errorLogin.jsp");
   }
%>
<%@ page import="com.msti.entity.Student"%>
<%@ page import="com.msti.entity.Batch"%>
<%@ page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@page import="com.msti.entity.Employee"%>
<%@page import="com.msti.entity.Course"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Student Details</title>
<link rel="stylesheet" type="text/css" href="css/common.css" />
</head>
<body>
<div class="wrapper">
	<form action="" method="post" class="form" id="student_details">
		<div id="form_header">Student Details</div>
		
<%
	List<Course> courses = new ArrayList<Course>();
	List<Student> allUnConStudent = new ArrayList<Student>();
	allUnConStudent = (List<Student>) request.getSession()
			.getAttribute("allUnConStudent");
	int i = Integer.parseInt(request.getParameter("i"));
	Student student = allUnConStudent.get(i);
%>
		<ul>
			<li><p class="label">Name: </p><p><%=student.getFullName()%></p></li>
			<li><p class="label">NIC:<p><%=student.getNICNO()%></p></li>
			<li><p class="label">Address:<p><%=student.getAddress()%></p></li>
			<li><p class="label">Passport No:<p><%=student.getPassportNo()%></p></li>
			<li><p class="label">CDCNO:<p><%=student.getCDCNO()%></p></li>
			<li><p class="label">Telephone:<p><%=student.getPhone()%></p></li>
		</ul>
			
		
Selected Courses:
		<% List<Batch> stBatch = student.getBatch();
			Iterator<Batch> iterator = stBatch.iterator();
			while(iterator.hasNext()){
				Batch batch = iterator.next();
				%>
		<%=batch.getCourse().getName() %>
		<% } %>
		

		<div class="btn_pannel">
			<input type="submit" name="btn_action" id="confirm" value="Confirm" class="button" />
			<input type="submit" name="btn_action" id="reject" value="Reject" class="button" />
			<input type="button" name="btn_action" id="back" value="Back" class="button" />
		</div>
	</form>
	<div class="company_name_bar"><marquee direction="left">Mercantile Seamen Training Institute Ltd.</marquee></div>
</div>
</body>
</html>